home *** CD-ROM | disk | FTP | other *** search
/ PC PowerPlay 22 / PCPP #22.iso / Quake2 / q2source_12_11 / utils3 / qe4 / entity.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-05  |  1.5 KB  |  64 lines

  1.  
  2. // entity.h
  3.  
  4.  
  5. #define    MAX_FLAGS    8
  6.  
  7. typedef struct eclass_s
  8. {
  9.     struct eclass_s *next;
  10.     char    *name;
  11.     qboolean    fixedsize;
  12.     qboolean    unknown;        // wasn't found in source
  13.     vec3_t    mins, maxs;
  14.     vec3_t    color;
  15.     texdef_t    texdef;
  16.     char    *comments;
  17.     char    flagnames[MAX_FLAGS][32];
  18. } eclass_t;
  19.  
  20. extern    eclass_t    *eclass;
  21.  
  22. void Eclass_InitForSourceDirectory (char *path);
  23. eclass_t *Eclass_ForName (char *name, qboolean has_brushes);
  24.  
  25. //===================================================
  26.  
  27.  
  28. typedef struct epair_s
  29. {
  30.     struct epair_s    *next;
  31.     char    *key;
  32.     char    *value;
  33. } epair_t;
  34.  
  35. typedef struct entity_s
  36. {
  37.     struct    entity_s    *prev, *next;
  38.     brush_t        brushes;    // head/tail of list
  39.     vec3_t        origin;
  40.     eclass_t    *eclass;
  41.     epair_t        *epairs;
  42. } entity_t;
  43.  
  44. char     *ValueForKey (entity_t *ent, char *key);
  45. void    SetKeyValue (entity_t *ent, char *key, char *value);
  46. void     DeleteKey (entity_t *ent, char *key);
  47. float    FloatForKey (entity_t *ent, char *key);
  48. int        IntForKey (entity_t *ent, char *key);
  49. void     GetVectorForKey (entity_t *ent, char *key, vec3_t vec);
  50.  
  51. void        Entity_Free (entity_t *e);
  52. entity_t    *Entity_Parse (qboolean onlypairs);
  53. void        Entity_Write (entity_t *e, FILE *f, qboolean use_region);
  54. entity_t    *Entity_Create (eclass_t *c);
  55. entity_t    *Entity_Clone (entity_t *e);
  56.  
  57. void        Entity_LinkBrush (entity_t *e, brush_t *b);
  58. void        Entity_UnlinkBrush (brush_t *b);
  59. entity_t *FindEntity(char *pszKey, char *pszValue);
  60. entity_t *FindEntityInt(char *pszKey, int iValue);
  61.  
  62. int GetUniqueTargetId(int iHint);
  63.  
  64.